<!---
	Title:		Duty Roster Admin Page
	Author:		Bruce Frick
	Purpose:	Set the data elements for today's Duty Roster.
--->
<cfcomponent>

	<cfinclude template="/code_lib/SCF_Exchange.cfm" />
	<cfinclude template="/code_lib/SCF_Employee.cfm" />
	<cfinclude template="/code_lib/AppSecurity.cfm" />
    
    <!---HTML header and footer.  Thsee blocks of html are on every page, so I made function to spit them out.--->
	<cffunction name="htmlHeader" access="public" returntype="any" >
    	<cfargument default="" name="js_list" type="any" required="no" />
    	<cfargument default="" name="css_list" type="any" required="no" />
        <cfargument default="Pediatrics Roster" name="title" type="string" required="no" />

        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title><cfoutput>#title#</cfoutput></title>
        
        <link href="../apt/css/main.css" rel="stylesheet" type="text/css" />
        <cfif ListLen(css_list) gt 0>
    		<cfloop list="#css_list#" index="css" delimiters=",">
	 			<link href="<cfoutput>#css#</cfoutput>" rel="stylesheet" type="text/css" />
        	</cfloop>
        </cfif>        
        
		<cfif ListLen(js_list) gt 0>
    		<cfloop list="#js_list#" index="js" delimiters=",">				
		 		<script language="Javascript" type="text/javascript" src="<cfoutput>#js#</cfoutput>" ></script>				
        	</cfloop>
        </cfif>
        
        </head> 
		<script type="text/javascript">
			function resizeWindow(){
				window.resizeTo(document.body.scrollWidth, document.body.scrollHeight+10);
				window.resizeTo(document.body.scrollWidth, document.body.scrollHeight+150);
			}			
        </script>    
        <body>
    </cffunction>
    
    <cffunction name="htmlFooter" access="public" returntype="any" >
		</body>
        </html>
    </cffunction>
    
    
    
    <cffunction name="funcFindAddedStaffName" access="public" returntype="any" >
		<cfargument default="-1" name="ID" required="yes" />
        
       <cfif ID eq -1>
        	<cfreturn "NA" />
        <cfelseif ID eq -2>
        	<cfreturn "NA" />
        <cfelseif ID eq -3>
        	<cfreturn " " />
        </cfif>
        
        <cfif SCF_Employee_GetEmployee(ID).ROSETTAID neq 0 >
        	<cfreturn SCF_Employee_GetEmployee(ID).LastNameFirst />
        <cfelse>
        	<cfset staff = CreateObject("component", "queries").FuncQryGetAddedStaffByID(RemoveChars(ID,1,5)) />
            <cfreturn staff />
        </cfif>
        
    </cffunction>
    
   
</cfcomponent>